home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Getting my facet from withi < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Getting my facet from within ::DoCharKey
  2. Sent:        6/11/96 12:01 PM
  3. Received:    6/11/96 12:11 PM
  4. From:        Laurent Delamare, laurentd@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >I need to get my facet from within the  ::DoCharKey method of my View so
  9. >that I can set up a "FW_CViewContext" for rendering.
  10. >
  11. >What's the best way to do it?
  12. >
  13. >Is there an easier way than grabbing my frame and iterating to it's first
  14. >facet?
  15.  
  16. In theory you could use frame->GetActiveFacet(ev)  which returns the 
  17. "active facet", i.e. the last facet that handled a mouse or activate 
  18. event.
  19. However every time you need to draw something in your frame you should 
  20. iterate through all its facets to be sure that it will be correct in all
  21. situations (you never know what kind of container will split your part
  22. into multiple facets, like ODF Embed for instance).
  23.  
  24. ______________________________________________________________________
  25. Laurent Delamare               laurentd@apple.com
  26. ODF Team                       http://www.devtools.apple.com/odf/
  27. Apple Computer, Inc.           http://www.opendoc.apple.com/
  28.